﻿using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Padsurface.Audio.Tests.Unit.MetronomeSpecifications
{
    public abstract class WhenStart : MetronomeTestBase
    {
        protected override void Act()
        {
            Metronome.Start();
        }
    }

    [TestClass]
    public class WhenStartGivenAlreadyStarted : WhenStart
    {
        protected override void Arrange()
        {
            base.Arrange();
            Metronome.Start();
        }

        protected override void Act()
        {
            ExpectException(base.Act);
        }

        [TestMethod]
        public void ThenAnInvalidOperationExceptionShouldBeThrown()
        {
            Assert.IsNotNull(Exception);
            Assert.AreEqual(typeof(InvalidOperationException), Exception.GetType());
        }
    }
}
